// Copyright (c) 2007 Robin Boerdijk. All rights reserved.
//
// This software is licensed under the terms of the Microsoft Reciprocal License as described 
// in the file LICENSE.txt, which you should have received as part of this distribution. The 
// license terms are also available at http://www.opensource.org/licenses/ms-rl.html.

#include "demo/MenuBar.h"

namespace demo
{
	MenuBar::FileMenu::FileMenu(MenuBar *menuBar) 
		: wtk::SubMenu(menuBar, L"File")
		, New(this, L"New...")
		, Open(this, L"Open...")
		, SaveAll(this, L"Save all")
		, Exit(this, L"Exit", Separate)
	{
	}

	MenuBar::EditMenu::EditMenu(MenuBar *menuBar) 
		: wtk::SubMenu(menuBar, L"Edit")
		, Undo(this, L"Undo\tCtrl+Z")
		, Redo(this, L"Redo\tCtrl+Y")
		, Cut(this, L"Cut\tCtrl+X", Separate)
		, Copy(this, L"Copy\tCtrl+C")
		, Paste(this, L"Paste\tCtrl+V")
	{
	}

	MenuBar::ViewMenu::ViewMenu(MenuBar *menuBar) 
		: wtk::SubMenu(menuBar, L"View")
	{
	}

	MenuBar::ToolsMenu::ToolsMenu(MenuBar *menuBar)	
		: wtk::SubMenu(menuBar, L"Tools")
		, Calculator(this, L"Calculator")
	{
	}

	MenuBar::WindowMenu::WindowMenu(MenuBar *menuBar) 
		: wtk::SubMenu(menuBar, L"Window")
	{
	}

	MenuBar::HelpMenu::HelpMenu(MenuBar *menuBar) 
		: wtk::SubMenu(menuBar, L"Help")
		, About(this, L"About WTK")
	{
	}

	MenuBar::MenuBar()
		: FileMenu(this)
		, EditMenu(this)
		, ViewMenu(this)
		, ToolsMenu(this)
		, WindowMenu(this)
		, HelpMenu(this)
	{
	}
}
